import { createApp } from 'vue'
import { createPinia } from 'pinia'
import router from './router'
import {
  create,
  NButton,
  NForm,
  NFormItem,
  NInput,
  NCard,
  NTabs,
  NTabPane,
  NIcon,
  NMenu,
  NLayoutHeader,
  NLayoutFooter,
  NLayout,
  NLayoutContent,
  NSpace,
  NDropdown,
  NCarousel,
  NGrid,
  NGridItem,
  NStatistic,
  NTimeline,
  NTimelineItem,
  NSteps,
  NStep,
  NResult,
  NModal,
  NInputNumber,
  NSelect,
  NUpload,
  NSwitch,
  NMessageProvider,
  NDatePicker,
  NDescriptions,
  NDescriptionsItem,
  NTag,
  NSpin,
  NAlert
} from 'naive-ui'
import './style.css'
import App from './App.vue'

const naive = create({
  components: [
    NButton,
    NForm,
    NFormItem,
    NInput,
    NCard,
    NTabs,
    NTabPane,
    NIcon,
    NMenu,
    NLayoutHeader,
    NLayoutFooter,
    NLayout,
    NLayoutContent,
    NSpace,
    NDropdown,
    NCarousel,
    NGrid,
    NGridItem,
    NStatistic,
    NTimeline,
    NTimelineItem,
    NSteps,
    NStep,
    NResult,
    NModal,
    NInputNumber,
    NSelect,
    NUpload,
    NSwitch,
    NMessageProvider,
    NDatePicker,
    NDescriptions,
    NDescriptionsItem,
    NTag,
    NSpin,
    NAlert
  ]
})

// 创建应用实例
const app = createApp(App)

// 使用插件
app.use(naive)
app.use(createPinia())
app.use(router)

// 挂载应用
app.mount('#app')
